home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / progjour / 1991 / 06 / alib / readfile.asm < prev    next >
Assembly Source File  |  1991-06-25  |  372b  |  29 lines

  1.     include    asm.inc
  2.  
  3.     public    read_from_file
  4.  
  5.     .code
  6.     extn    ms_dos_strerror
  7.  
  8. ;;    read from file
  9. ;
  10. ;    entry    BX    file handle
  11. ;        CX    byte count
  12. ;        ES:DI    destination
  13. ;    exit    AX    number of bytes read
  14. ;        Cf    if error
  15. ;
  16. read_from_file proc
  17.     push    ds
  18.     mov    ah,3Fh
  19.     push    es
  20.     pop    ds
  21.     xchg    dx,di
  22.     call    ms_dos_strerror
  23.     xchg    di,dx
  24.     pop    ds
  25.     ret
  26. read_from_file endp
  27.  
  28.     end
  29.